<template>
  <el-menu
    default-active="2"
    class="el-menu-vertical-demo"
    @open="handleOpen"
    @close="handleClose"
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b"
    unique-opened
    router
  >
    <menu-item v-for="menu in menus" :menu="menu" :key="menu.path"></menu-item>
  </el-menu>
</template>
<script>
import MenuItem from "./NavMenuItem.vue";
export default {
  props: ["menus"],
  components: {
      MenuItem
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>